<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .pie{
            width: 100px;
            height: 100px;
            line-height: 100px;
            border-radius: 50%;
            background: orangered;
            margin: 100px;
            position: relative;
            text-align: center;
            color: transparent;
            background-image: linear-gradient(to right,transparent 50%, yellowgreen 0);
        }
        .pie::before{
            content: "";
            display: block;
            position: absolute;
            top: 0;
            left: 50%;
            /* margin-left: 50%; */
            height: 100%;
            width: 50%;
            background-color: inherit;
            transform-origin: left;/*绕着圆形的圆心来旋转 */
            border-radius: 0 100% 100% 0/50%;
            animation: spin 50s linear infinite,
                        bg  100s step-end infinite;
            animation-play-state: paused;
            animation-delay: inherit;
        }
        @keyframes spin{
            to{
                transform: rotate(180deg);
            }
        }
        @keyframes bg{
            50%{
                background: yellowgreen;
            }
        }
    </style>
</head>
<body>
    <div class="pie" style="animation-delay:-20s;">20%</div>
    <div class="pie" style="animation-delay:-60s;">60%</div>
</body>
</html>